package com.sikaryofficial.workbench.domain.mapping;

import com.sikaryofficial.workbench.domain.dto.req.membership.MembershipPolicySaveReq;
import com.sikaryofficial.workbench.domain.dto.resp.membership.MembershipPolicyDTO;
import com.sikaryofficial.workbench.domain.dto.resp.membership.MembershipPolicyLogDTO;
import com.sikaryofficial.workbench.domain.entity.MembershipPolicy;
import com.sikaryofficial.workbench.domain.entity.MembershipPolicyLog;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author : wuweihong
 * @desc : TODO  请填写你的功能描述
 * @date : 2024-10-20
 */

@Mapper
public interface MembershipMapping {

	MembershipMapping INSTANCE = Mappers.getMapper(MembershipMapping.class);

	/**
	 * 实体映射save req
	 *
	 * @param req
	 * @return
	 */
	MembershipPolicy coverToSaveReq(MembershipPolicySaveReq req);

	/**
	 * 响应实体映射resp
	 *
	 * @param membershipPolicy
	 * @return
	 */
	MembershipPolicyDTO coverToResp(MembershipPolicy membershipPolicy);

	/**
	 * 响应实体列表映射resp
	 *
	 * @param membershipPolicies
	 * @return
	 */
	List<MembershipPolicyDTO> coverListToResp(List<MembershipPolicy> membershipPolicies);

	/**
	 * 日志响应实体映射resp
	 *
	 * @param membershipPolicyLog
	 * @return
	 */
	MembershipPolicyLogDTO coverLogToResp(MembershipPolicyLog membershipPolicyLog);

	/**
	 * 日志响应实体列表映射resp
	 *
	 * @param membershipPolicyLogs
	 * @return
	 */
	List<MembershipPolicyDTO> coverLogListToResp(List<MembershipPolicyLog> membershipPolicyLogs);


}
